﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace YinfangWeb.BLL.Enum
{
    /// <summary>
    /// 用户角色
    /// </summary>
    public enum EnumUserRole
    {
        /// <summary>
        /// 总公司管理员
        /// </summary>
        Manager = 1,
        /// <summary>
        /// 城市合伙人
        /// </summary>
        CityManager = 2,
        /// <summary>
        /// 事业合伙人
        /// </summary>
        Business = 3,
        /// <summary>
        /// 业主
        /// </summary>
        Oroprietor = 4
    }
    /// <summary>
    /// 用户权限
    /// </summary>
    public enum EnumUserRight
    {
        /// <summary>
        /// 商品创建权
        /// </summary>
        Product_Create = 100,
        /// <summary>
        /// 商品列表权
        /// </summary>
        Product_List = 101,
        /// <summary>
        /// 商品修改权
        /// </summary>
        Product_Update = 102,
    }

    #region EnumUserData_UserState
    public enum EnumUserData_UserState
    {
        /// <summary>
        /// 删除
        /// </summary>
        Delete = 0,
        /// <summary>
        /// 正常
        /// </summary>
        Normal = 1,
        /// <summary>
        /// 锁定
        /// </summary>
        Locked = 2,
        /// <summary>
        /// 停用
        /// </summary>
        Stop = 3,
    }
    public static class EnumUserData_UserStateExtension
    {
        public static string GetMsg(this EnumUserData_UserState code)
        {
            var Msg = string.Empty;
            switch (code)
            {
                case EnumUserData_UserState.Delete:
                    Msg = "账号已删除";
                    break;
                case EnumUserData_UserState.Normal:
                    Msg = "账号正常";
                    break;
                case EnumUserData_UserState.Locked:
                    Msg = "账号已锁定";
                    break;
                case EnumUserData_UserState.Stop:
                    Msg = "账号已停用";
                    break;
            }
            return Msg;
        }
    }
    #endregion

    #region EnumUserLog_LogType
    public enum EnumUserLog_LogType  
    {
        /// <summary>
        /// 未知
        /// </summary>
        Unknown = 0,
        /// <summary>
        /// 登录
        /// </summary>
        Login = 1,
        /// <summary>
        /// 注销
        /// </summary>
        Logout = 2,
        /// <summary>
        /// 修改密码
        /// </summary>
        ChangePassword = 3,
        /// <summary>
        /// 账号状态
        /// </summary>
        ChangeState = 4,
    }
    public static class EnumUserLog_LogTypeExtension
    {
        public static string GetMsg(this EnumUserLog_LogType code)
        {
            var Msg = string.Empty;
            switch (code)//0 1 2 3 4
            {
                case EnumUserLog_LogType.Unknown:
                    Msg = "未知";
                    break;
                case EnumUserLog_LogType.Login:
                    Msg = "登录";
                    break;
                case EnumUserLog_LogType.Logout:
                    Msg = "注销";
                    break;
                case EnumUserLog_LogType.ChangePassword:
                    Msg = "修改密码";
                    break;
                case EnumUserLog_LogType.ChangeState:
                    Msg = "账号状态变化";
                    break;
            }
            return Msg;
        }
    }
    #endregion
    #region EnumUserLog_LogPlatform
    public enum EnumUserLog_LogPlatform
    {
        /// <summary>0未知 1  2
        /// 未知
        /// </summary>
        Unknown = 0,
        /// <summary>
        /// WEB
        /// </summary>
        Web = 1,
        /// <summary>
        /// 小程序
        /// </summary>
        MiniProgram = 2,
    }
    public static class EnumUserLog_LogPlatformExtension
    {
        public static string GetMsg(this EnumUserLog_LogPlatform code)
        {
            var Msg = string.Empty;
            switch (code)//0 1 2 3 4
            {
                case EnumUserLog_LogPlatform.Unknown:
                    Msg = "未知";
                    break;
                case EnumUserLog_LogPlatform.Web:
                    Msg = "WEB";
                    break;
                case EnumUserLog_LogPlatform.MiniProgram:
                    Msg = "小程序";
                    break;
            }
            return Msg;
        }
    }
    #endregion


}